<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       body {
           /* 透视属性，做3d效果之前必须声明的 值一般固定的 不必纠结多少 需填写在高一级的父 或爷级里 */
           perspective:500px;
       }
       .box {
           position: relative;
           width: 200px;
           height: 200px;
           margin: 100px auto;
           /* 子盒子都各自保持已有3d效果 preserve保持的意思 此属性虽然是声明子盒子的但需要填写在父级元素里 */
           transform-style: preserve-3d;
           transition: all 2s;
       }
       .box:hover {
           transform: rotatey(69deg);
       }
       .box div {
           position: absolute;
           left: 0;
           width: 100%;
           height: 100%;
           background-color: green;
       }
       .box div:last-child {
           position: absolute;
           left: 0;
           width: 100%;
           height: 100%;
           background-color: blue;
           transform:rotatex(60deg);
       }
    </style>
</head>

<body>
    <div class="box">
        <div></div>
        <div></div>

    </div>
</body>

</html>